programming - C - function strrchrWhat links here?
Defined in string.h.

Find last occurrence of character in string.
Returns the last occurrence of c in string.
The null-terminating character is included as part of the string and can also be searched.

Parameters.

Return Value.

Portability.



 const char * strrchr ( const char * string, int c );
       char * strrchr (       char * string, int c );
Both have the same behavior as the original declaration.

Example.

/* strrchr example */
  1. include
  2. include


int main () { char str[] = "This is a sample string"; char * pch; pch=strrchr(str,'s'); printf ("Last occurence of 's' found at %d \n",pch-str+1); return 0; }


Output: Last occurrence of 's' found at 18

See also.
strchr, strcspn, strcmp, strstr, memchr

From http://www.cplusplus.com/ref/
programming - C - function strrchr
filename:programming - C - function strrchr
filename:programming%20%2D%20C%20%2D%20function%20strrchr
last edit:March 29 2009 21:08:34 (5516 days ago)
ct = 1714983989.000000 = May 06 2024 04:26:29
ft = 1238375314.000000 = March 29 2009 21:08:34
dt = 476608675.000000